﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <?php
        require('../../Smarty/libs/Smarty.class.php');

        include_once 'API/APIObject.php';

        $smarty = new Smarty;

        $smarty->setTemplateDir('./smarty/templates/');
        $smarty->setCompileDir('./smarty/templates_c/');
        $smarty->setConfigDir('./smarty/configs/');
        $smarty->setCacheDir('./smarty/cache/');

        $smarty->display('preHeader.tpl');
        echo '<body style="position: relative; top:-16px; " >';
        //$smarty->display('header.tpl');
        //$smarty->display('flashyBox.tpl');
        //$smarty->display('mainPage.tpl');
        //$smarty->display('footer.tpl');
        // Get itinerary
        include_once 'API/APIObject.php';
        $api = new APIObject();

        $itinRes = $api->GetItinerary("104333229", "cristian.daraban@xoomworks.com");
        //$api->PrintTestDataOnScreen($resp, "ITINERARY DATA");

        $roomsDataConfirm = array(0=>array(0=>"Test Booking Test Booking",1=>" 1 Adult 2 Children"),
		  1=>array(0=>"Test Booking1 Test Booking1",1=>"1 Adult"));
        $priceNightlyRate = array(0 => 231, 1=>232);
        $taxes = 0;
	ConfirmationPage(
	$itinRes->Itinerary->itineraryId,
	$itinRes->Itinerary->HotelConfirmation->confirmationNumber,
	$itinRes->Itinerary->HotelConfirmation->roomDescription,
	"<b>Trip Advisor Info:This hotel is rated: 23</b>",
	array(),
	array(),
	$itinRes->Itinerary->HotelConfirmation->arrivalDate,
	$itinRes->Itinerary->HotelConfirmation->departureDate,
	$itinRes->Itinerary->HotelConfirmation->nights,
	$itinRes->Itinerary->HotelConfirmation->numberOfAdults." Adult(s)",
	$itinRes->Itinerary->HotelConfirmation->roomDescription,
	count($itinRes->Itinerary->HotelConfirmation->RateInfos->RateInfo),
	array(0=>"romDet1",1=>"roomDet2"),
	$roomsDataConfirm,
	$itinRes->Itinerary->HotelConfirmation->RateInfos->RateInfo->ChargeableRateInfo->{'@currencyCode'},
	$priceNightlyRate,
	$taxes,
	$itinRes->Itinerary->HotelConfirmation->RateInfos->RateInfo->ChargeableRateInfo->{'@total'},
	"Test Booking Test Booking",
	$itinRes->Itinerary->Customer->CustomerAddresses->address1,
	$itinRes->Itinerary->Customer->email,
	$itinRes->Itinerary->Customer->homePhone,
	$itinRes->Itinerary->HotelConfirmation->cancellationPolicy
	);

        echo '</body>';
    ?>
</html>